<%@ page language="java" contentType="text/html;charset=utf-8" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
    <jsp:include page="../common/common.jsp"/>
</head>
<body class="page-header-fixed">
    <jsp:include page="../common/header.jsp"/>
    <div class="clearfix"></div>
    <div class="page-container">
        <div class="page-sidebar-wrapper"><jsp:include page="../common/menu.jsp"/></div>
        <div class="page-content-wrapper">
            <div class="page-content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="portlet box purple">
                            <div class="portlet-title">
                                <div class="caption">
                                    <i class="fa fa-reorder"></i> 订单管理
                                </div>
                                <div class="tools">
                                    <div class="actions">
                                        <a href="${path}/order/downExcel?orderType=${type}" target="_blank" class="btn blue">导出Excel</a>
                                    </div>
                                </div>
                            </div>
                            <div class="portlet-body">
                                <form id="formQuery" class="form-horizontal" action="${path}/order/list">
                                    <div class="form-body">
                                        <div class="form-group">
                                            <label class="col-md-1 control-label">订单编号</label>
                                            <div class="col-md-3">
                                                <input id="orderNo" name="id" class="form-control"/>
                                            </div>
                                            <label class="col-md-1 control-label">商品名称</label>
                                            <div class="col-md-3">
                                                <input id="goodsName" name="goodsName" class="form-control"/>
                                            </div>
                                            <label class="col-md-1 control-label">状态</label>
                                            <div class="col-md-2">
                                                <select id="status" name="status" class="form-control">
                                                    <option value="">所有</option>
                                                    <option value="1">成功</option>
                                                    <option value="2">失败</option>
                                                    <option value="3">撤销订单</option>
                                                    <option value="4">未支付</option>
                                                </select>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-md-1 control-label">订单时间</label>
                                            <div class="col-md-4">
                                                <div class="input-group input-large date-picker input-daterange"
                                                     data-date-format="yyyy-mm-dd">
                                                    <input type="text" class="form-control" id="fromDate" name="fromDate" value="${fromDate}"
                                                           readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
                                                    <span class="input-group-addon">to</span>
                                                    <input type="text" class="form-control" id="toDate" name="toDate" value="${toDate}"
                                                           readonly="readonly" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
                                                </div>
                                            </div>
                                            <%--<div class="col-md-2">
                                                <select id="keyType" name="keyType" class="form-control">
                                                    <option value="">模糊匹配</option>
                                                    <option value="userName">姓名</option>
                                                    <option value="telephone">电话</option>
                                                    <option value="inmoney">资金</option>
                                                    <option value="acreage">面积</option>
                                                </select>
                                            </div>
                                            <div class="col-md-3">
                                                <input id="keywords" name="keywords" class="form-control"/>
                                            </div>--%>
                                            <div class="col-md-1">
                                                <button type="button" class="btn green" onclick="getOrderList()">查询</button>
                                            </div>
                                        </div>
                                    </div>
                                    <input type="hidden" name="b" value="${type}"/>
                                </form>
                                <table class="table table-striped table-bordered table-hover" id="orderList"></table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <input type="hidden" id="type" value="${type}">
        </div>
    </div>
    <jsp:include page="../common/footer.jsp"/>
    <script type="text/javascript" src="${path}/assets/plugins/calendar/WdatePicker.js"></script>
    <script type="text/javascript" src="${path}/operate/js/order.js"></script>
    <script type="text/javascript">
        $(function() { getOrderList(); });
    </script>
</body>
</html>